package com.handle.kafka;

import cn.hutool.json.JSONObject;
import com.handle.entity.StockCirculation;

import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * @author: create by God of SJF
 * @version: v1.0
 * @description: com.handle.kafka
 * @date:2021/8/26
 */
public class Test {

    static Map<String, String> map = new HashMap<>();
     static void doMap (){
         map.put("_id","id");
         map.put("_barcode_content","barcodeContent");
         map.put("_status","status");
         map.put("_operate_time","operateTime");
         map.put("_operate_name","operateName");
         map.put("_organization_type","organizationType");
         map.put("_organization_code","organizationCode");
         map.put("_organization_name","organizationName");
         map.put("_product_code","productCode");
         map.put("_dealers_type","dealersType");
         map.put("_dealers_code","dealersCode");
         map.put("_dealers_name","dealersName");
         map.put("_product_name","productName");
         map.put("_batch_code","batchCode");
         map.put("_product_line_code","productLineCode");
         map.put("_product_line_name","productLineName");
         map.put("_workshop_code","workshopCode");
         map.put("_workshop_name","workshopName");
         map.put("_product_team_code","productTeamCode");
         map.put("_product_team","productTeam");
         map.put("_warehouse_code","warehouseCode");
         map.put("_warehouse_name","warehouseName");
         map.put("_towarehouse_code","toWarehouseCode");
         map.put("_towarehouse_name","toWarehouseName");
         map.put("_workid","workId");
         map.put("_batch_no","batchNo");
     }


    public static void main(String[] args) throws Exception{
        File file = new File("/Users/libin/Desktop/码流转2/1.json");
        Scanner scanner = new Scanner(file);
        while (scanner.hasNext()) {
            String line = scanner.nextLine();
            JSONObject json = new JSONObject(line);
            StockCirculation stockCirculation = json.toBean(StockCirculation.class);
            System.out.println("2321321");
        }
    }
}
